package com.plian.system.service.im;

import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.metadata.fill.FillConfig;
import com.plian.system.dto.im.BaseInvestmentExecutionDTO;
import com.plian.system.entity.im.EffectiveInvestment;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.vo.im.EffectiveInvestmentVO;
import com.plian.system.vo.im.InvestmentMonthSummaryVO;
import com.plian.system.vo.report.ReportReturnVO;

import java.util.List;

/**
 * 服务类
 *
 * @author
 * @since 2019-09-27
 */
public interface IEffectiveInvestmentService extends BaseService<EffectiveInvestment> {

    /**
     * 保存 包含子表
     * @param effectiveInvestment
     * @return
     */
    boolean submit(EffectiveInvestment effectiveInvestment);

    /**
     * 获取detail obj对象
     * @param effectiveInvestmentVO
     * @return
     */
    EffectiveInvestmentVO getDetailPd(EffectiveInvestmentVO effectiveInvestmentVO);

    /**
     * 获取上月 重点项目情况对象
     * @param id
     * @return
     */
    EffectiveInvestmentVO getLastMainInfos(Long id);

    /**
     * 市属国有企业有效投资月度汇总表
     * @param baseInvestmentExecutionDTO
     * @return
     */
    List<InvestmentMonthSummaryVO> summary(BaseInvestmentExecutionDTO baseInvestmentExecutionDTO);

    /**
     * 月报表 sheet页 一、有效投资情况 数据写入
     * @param effectiveInvestment
     * @param excelWriter
     * @param writeSheet
     * @param fillConfig
     */
    void write(EffectiveInvestment effectiveInvestment, ExcelWriter excelWriter, WriteSheet writeSheet, FillConfig fillConfig);

    /**
     * 根据主表删除
     * @param ids
     * @return
     */
    boolean deleteByParentId(List<Long> ids);

    /**
     * 效投资考核明细表-统计用（   月度）
     * @param baseInvestmentExecutionDTO
     * @return
     */
    ReportReturnVO effectiveSummary(BaseInvestmentExecutionDTO baseInvestmentExecutionDTO);

    /**
     * 校验数据
     * @param effectiveInvestment
     * @return
     */
    String check(EffectiveInvestment effectiveInvestment);

}
